import { Column, Entity } from "typeorm";
import { BaseEntity } from "../base";
import { CommonStatus } from "../../../../interface";


@Entity('base_sys_category', { comment: '瓷片区类目' })
export class BaseSysCategoryEntity extends BaseEntity {
    @Column({ comment: '分类名称' })
    name: string;

    @Column({ comment: '分类描述' })
    description: string;

    @Column({ comment: '分类类型', type: 'enum', enum: ['pc', 'mini', 'app', 'web', 'other'], default: 'app' })
    type: 'pc' | 'mini' | 'app' | 'web' | 'other' = 'app'

    @Column({ comment: '分类链接类型', type: 'enum', enum: ['url', 'category'], default: 'url' })
    linkType: 'url' | 'message' = 'url'

    @Column({ comment: '分类链接值' })
    linkValue: string

    @Column({ comment: '分类图标' })
    icon: string

    @Column({ comment: '分类排序', default: 0 })
    order: number

    @Column({ comment: '分类状态', type: 'enum', enum: CommonStatus, default: CommonStatus.NORMAL })
    status: CommonStatus = CommonStatus.NORMAL


}